<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="com.lmpop.trade.tb_logs.*" %>

<%@page import="java.util.*" %>
<% 

  	String trade_id="";
  	if(request.getParameter("trade_id")!=null) trade_id = request.getParameter("trade_id");
  	Tb_logsInfo tb_logsInfo = new Tb_logsInfo();
  	List list = tb_logsInfo.getListByPk(trade_id);
  	Hashtable map = new Hashtable();
  	if(list!=null && list.size()>0) map = (Hashtable)list.get(0);
  	
  	String trade_type_code="",cust_id="",oper_content="",oper_result="",ip="",trade_name="",
  	ref_src="",oper_date="",user_name="",user_id="",remark="",result="",cust_name="";
  	if(map.get("trade_type_code")!=null) {
  		trade_type_code = map.get("trade_type_code").toString();
  		trade_name = tb_logsInfo.getTradeNameById(trade_type_code);
  	}
  	if(map.get("cust_id")!=null) {
  		cust_id = map.get("cust_id").toString();
  		if(cust_id.equals("000000000000000")){
  			cust_name = "运营商";
  		}else{
  			if(map.get("cust_name")!=null) cust_name = map.get("cust_name").toString();
  		}
  	}
  	if(map.get("oper_content")!=null) oper_content = map.get("oper_content").toString();
  	if(map.get("oper_result")!=null){
  		 oper_result = map.get("oper_result").toString();
  		 if(oper_result.equals("0")){
  			result = "成功";
  		 }
  		 if(oper_result.equals("1")){
  			result = "失败";
  		 }
  	}
  	if(map.get("ip")!=null) ip = map.get("ip").toString();
  	if(map.get("ref_src")!=null) ref_src = map.get("ref_src").toString();
  	if(map.get("oper_date")!=null) oper_date = map.get("oper_date").toString();
  	if(oper_date.length()>19)oper_date=oper_date.substring(0,19);
  	if(map.get("user_name")!=null) user_name = map.get("user_name").toString();
  	if(map.get("user_id")!=null) user_id = map.get("user_id").toString();
  	if(map.get("remark")!=null) remark = map.get("remark").toString();

	
	String ipaddr = "";
	if(request.getParameter("ipaddr")!=null && !request.getParameter("ipaddr").equals("")){
		ipaddr = request.getParameter("ipaddr");
	}
	
	String txtStartDate = "";
	if(request.getParameter("txtStartDate")!=null && !request.getParameter("txtStartDate").equals("")){
		txtStartDate = request.getParameter("txtStartDate");
	}
	String txtEndDate = "";
	if(request.getParameter("txtEndDate")!=null && !request.getParameter("txtEndDate").equals("")){
		txtEndDate = request.getParameter("txtEndDate");
	}
	String iStart = "0";
	if(request.getParameter("iStart")!=null) iStart = request.getParameter("iStart");
	String para ="/program/admin/mylogs/index.jsp?ipaddr="+ipaddr
	+"&txtStartDate="+txtStartDate+"&txtEndDate="+txtEndDate+"&iStart="+Integer.parseInt(iStart);
%>
<html>
  <head>
    <title>查看我的操作日志</title>
		<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
</head>

<body>

  
	
	<h1>查看我的操作日志</h1>
	<!--table width="100%" align="center" cellpadding="0" cellspacing="0" class="dl_so">
        <tr>
          <td width="9%" align="center"><img src="/program/admin/index/images/ban_01.gif" /></td>
          <td width="91%" align="left">
		  <h4>您可以按“行业”或“关键字”订阅</h4>
		  <span>1、填写关键字，您将及时了解与该产品相关的所有商机。</span><br/>
		  <span>2、为了更准确订阅，建议你选择产品所属的行业大类和行业子类。</span>
		  </td>
        </tr>
      </table-->
	<form action="/doTradeReg.do" method="post" name="addForm">
	<table width="100%" cellpadding="1" cellspacing="1" border="0" class="listtab">
		
		<tr>
			<td align="right" width="10%">
				业务名称:
			</td>
			<td><%=trade_name%></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				操作内容:
			</td>
			<td><%=oper_content%></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				操作结果:
			</td>
			<td><%=result%></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				IP:
			</td>
			<td><%=ip %></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				来源:
			</td>
			<td><%=ref_src %></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				操作时间:
			</td>
			<td><%=oper_date %></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				公司:
			</td>
			<td><%=cust_name%></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				操作人:
			</td>
			<td><%=user_name %></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				备注:
			</td>
			<td><%=remark %></td>
		</tr>
		
	</table>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				<input type="hidden" name="bpm_id" value="8836" />
				<input type="hidden" name="jumpurl" value="<%=para%>" />
	  			<input class="buttoncss" type="hidden" name="trade_id" value="<%=trade_id %>" />
				<input class="buttoncss" type="button" name="tradeRut" value="返回" onclick="window.location.href='<%=para%>';"/>
			</td>
		</tr>
	</table>
	</form>
</body>

</html>
